SQL query to display all values from multi select question as one field

I want to write a custom query to extract all values from the database from
a multi-select type question as one field the way odk aggregate displays
such fields. Any thoughts/ideas on how to go about this?