title: mysql query to display row data in one column
body: <p>I wrote query   like</p>
  
  <pre><code>SELECT 
  SUBSTRING_INDEX(inter.CHR_SKILLLEVELS, ',', 1) AS level1,
  IF(@num_lines &gt; 1, SUBSTRING_INDEX(SUBSTRING_INDEX(inter.CHR_SKILLLEVELS, ',', 2), ',', -1), '') AS level2,
  IF(@num_lines &gt; 2, SUBSTRING_INDEX(SUBSTRING_INDEX(inter.CHR_SKILLLEVELS, ',', 3), ',', -1), '') AS level3,
  IF(@num_lines &gt; 3, SUBSTRING_INDEX(SUBSTRING_INDEX(inter.CHR_SKILLLEVELS, ',', 4), ',', -1), '') AS level4,
  IF(@num_lines &gt; 4, SUBSTRING_INDEX(SUBSTRING_INDEX(inter.CHR_SKILLLEVELS, ',', 5), ',', -1), '') AS level5
  FROM hrm_t_interview inter, 
  (SELECT  @num_lines := 1 + LENGTH(CHR_SKILLLEVELS) - LENGTH(REPLACE(CHR_SKILLLEVELS, ',', ''))  FROM hrm_t_interview WHERE INT_APPLICANTID=15) temp
  WHERE inter.INT_APPLICANTID=15   
  </code></pre>
  
  <p>I displayed values like</p>
  
  <pre><code> level1    |   level2     |   level3
  ======================================
     4       |    3         |    5
  </code></pre>
  
  <p>I want to display values like</p>
  
  <pre><code> column1  |   column2
  ========================
    level1  |     4
    level2  |     3
    level3  |     5
  </code></pre>
  
  <p>Please help me using mysql.</p>