title: Mysql select non empty column
body: <p>If the mysql table for the gallery looks like:</p>
  
  <pre><code>    id     |    pic1    |   pic2    |    pic3    |     pic4    
   -------------------------------------------------------------
      1      |            |   b.jpg   |    c.jpg   |     d.jpg
  </code></pre>
  
  <p>How can I select the first non empty pic value from columns pic1, pic2, pic3, pic4 for the gallery with id=1?</p>
  
  <p>In example above it will be value from the pic2 column (b.jpg)</p>