title: Convert column names as row values in oracle
body: <p>I have bumped into a problem, where I want to convert column names of a table as row values and combine these column names with the data of that table to which these column belongs. </p>
  
  <p>I have data table as follows:</p>
  
  <pre><code>ID|QUERY_REF|COL_V1|COL_V2|COL_V3|COL_V4|COL_V5|COL_V6
  1|Q127|hdaskjdhakdjsadj asudakjdakhdkjjdjkskjdjsakhasuygwyeqe1747434834094432uilknfja|||||
  </code></pre>
  
  <p>Desired output</p>
  
  <pre><code>ID|QUERY_REF|COLUMNS
  1|Q127|COL_V1
  1|Q127|COL_V2
  1|Q127|COL_V3
  1|Q127|COL_V4
  1|Q127|COL_V5
  1|Q127|COL_V6
  </code></pre>
  
  <p>So far I have searched web, but no example corresponds to my problem. </p>
  
  <p>I have developed a select statement using union. But it does not gives me my desired result. Please help.</p>