title: SQL Results of multiple case statements in one row
body: <p>I have a table that contains:</p>
  
  <pre><code>EXTDEP EXTCODE PRICE
  200     10001   200
  500     10001   25
  600     10001   36
  </code></pre>
  
  <p>The result I want:</p>
  
  <pre><code>EXTCODE PRICE200 PRICE500 PRICE600
  10001    200       25         36
  </code></pre>
  
  <p>The result I get:</p>
  
  <pre><code>EXTCODE PRICE200 PRICE500 PRICE600
  10001    NULL      NULL        36
  10001    NULL       25        NULL
  10001    200       NULL       NULL  
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>SELECT  
        [ExtCode]
  
        case when extdep = '200' then price1 end as '200', 
        case when extdep = '500' then price1 end AS '500', 
        case when extdep = '600' then price1 end AS '600'
  </code></pre>
  
  <p>Any ideas? :)</p>