This is option group 110 in civicrm_option_value
I am trying to create a custom query for reporting that pulls the actual Custom Data LABELS ('Green Light','Red Light', etc)vs the custom data VALUES (1,2,3 etc) per the CIVI Terminology in Admin.
The following SQL:
SELECT civicrm_contact.id, civicrm_contact.display_name, civicrm_value_custom__safe_sport_co_9.usoc_sports_safe_complete_9, civicrm_value_custom__safe_sport_co_9.background_check_7, civicrm_value_custom__safe_sport_co_9.red_light_override_71, civicrm_value_custom__safe_sport_co_9.override_expiration_72, civicrm_value_custom__safe_sport_co_9.background_check_status_73 FROM civicrm_contact INNER JOIN civicrm_value_custom__safe_sport_co_9 ON civicrm_value_custom__safe_sport_co_9.entity_id = civicrm_contact.id WHERE civicrm_contact.id = 1000
1000,Billy Jenkins,2/27/2018,3/16/2018,0,NULL,1
I actually WANT
1000,Billy Jenkins,2/27/2018,3/16/2018,0,NULL,Green Light
This is micro version of what I actually need which is many more custom data columns but its the same situation, I can't simply join the civicrm_option_value.value field because there are dozens of values of '1' I'm not sure how to segment the 110 group only to pull what I need.
What should I do?