title: My SQL Subquery - Blob returned, need text value
body: <p>I'm trying to write a case statement in mysql which checks if a person has booked a room.  If they have, then return the roomtype, otherwise return an informative message.</p>
  
  <pre><code>(
  CASE
  WHEN (eab.accommodation_id &gt; 0)
  THEN (SELECT roomtype FROM event_accomodation WHERE id = eab.accommodation_id)
  ELSE (IFNULL(eab.accommodation_id, 'No accommodation needed'))
  END
  ) AS accommodation
  </code></pre>
  
  <p>This is the relevant part of the query.  If I run it like this, BLOB is returned for every row in the accommodation column. If I change the word 'roomtype' to a column which returns an integer, it works fine.</p>
  
  <p>Is there a way to convert the BLOB to string within mysql?</p>
  
  <p>Any advice appreciated.</p>
  
  <p>Thanks.</p>