title: Create columns from rows in SQL Server
body: <p>I have a SQL Query that bring data in the below format;</p>
  
  <pre><code>Total Hours   Year   
    100.00      2012 
    200.00      2012 
    300.00      2012 
     75.00      2011 
    150.00      2011 
     50.00      2010 
    125.00      2010 
  </code></pre>
  
  <p>I need to sum the total hours and bring the result set as;</p>
  
  <pre><code>2012   2011  2010
   600    225   175
  </code></pre>
  
  <p>Please help me here!. Let me know if you need more information.</p>