Custom Taxonomy Query

NOTE: This answer is supposed to be in addition to the answer here

The function used returns an array of all the items, so the best way to display them is to use a foreach loop. As a usage example

global $wpdb;
$result = $wpdb->get_col(....); //copy the line from the aforementioned answer

if($result) {
    echo '<ul>';
    foreach($result as $term) {
        echo '<li>' . $term . '</li>';
    }
    echo '</ul>';
}

In case you changed the get_col to get_results to query more details about the terms, the foreach loop changes just a little

    foreach($result as $term) {
        echo '<li>' . $term->name . ' with slug ' . $term->slug . '</li>';
    }