How can I show the data in the below format?
<p>I want to show the amount value based on the new/old Enrolled column value for the Name wise.</p>

<p>Current data:</p>

<pre><code>Name   | Enrolled| Amount      
------ | ------- | ------     
Deepak |   old   | 200       
bcd    |   New   | 500         
Deepak |   new   | 900         
bcd    |   old   | 300  
</code></pre>

<p>Expected result: </p>

<pre><code>Name   |     Enrolled     
------ |   old   | new
Deepak |   200   | 900
bcd    |   300   | 500
</code></pre>