 <p>Something like this.</p> <pre><code>select name,math as Grade from your_table union all select name,English as Grade from your_table union all select name,Arts as Grade from your_table </code></pre>