title: mysql get field name which contains value
body: <p>Table</p>
  
  <pre><code>---------------------------------------------
  | id | first_name | middle_name | last_name |
  ---------------------------------------------
  | 1  | abc        |             | def       |
  ---------------------------------------------
  | 2  |            |             | xyz       |
  ---------------------------------------------
  | 3  |  xyz       |             |           |
  ---------------------------------------------          
  </code></pre>
  
  <p>I want sql query which gives output as fields name which contains values and exclude fields which has empty value or null value.</p>
  
  <p>like</p>
  
  <p>id,
  first_name,
  last_name</p>