title: Mysql Convert Column to row (Pivot table )
body: <p>I have a table like this</p>
  
  <pre><code>+---+-----+----+----+----+----+
  |id |month|col1|col2|col3|col4|
  +---+-----+----+----+----+----+
  |101|Jan  |A   |B   |NULL|B   |
  +---+-----+----+----+----+----+
  |102|feb  |C   |A   |G   |E   |
  +---+-----+----+----+----+----+
  </code></pre>
  
  <p>And then I want to create report like this</p>
  
  <pre><code>+----+---+---+
  |desc|jan|feb|
  +----+---+---+
  |col1|A  |C  |
  +----+---+---+
  |col2|B  |A  |
  +----+---+---+
  |col3|0  |G  |
  +----+---+---+
  |Col4|B  |E  |
  +----+---+---+
  </code></pre>
  
  <p>Can anyone help with this?</p>