title: How to separate one column to several?
body: <p>I have a table:</p>
  
  <pre><code>DataTable:
   id int,
   user_id int,
   field_id int,
   value varchar
  </code></pre>
  
  <p>DataExample:</p>
  
  <pre><code>id    user_id    field_id   value 
   1       1            1       'Peter'
   2       1            2       56
   3       1            3       100
   4       2            1       'Buzz'
   5       2            2       47
   6       2            3       120
  </code></pre>
  
  <p>I want to separate <code>value</code> column by <code>field_id</code> property:</p>
  
  <pre><code>Name    Age     Score
  Peter   56      100
  Buzz    47      120
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>SELECT
      CASE
          WHEN field_id = 1 THEN  value
      END as Name,   
      CASE
          WHEN field_id = 2 THEN  value
      END as Age,
      CASE
          WHEN field_id = 3 THEN  value
      END as Score
      FROM Users u
      INNER JOIN DataTable t ON (t.user_id=u.id)
  </code></pre>
  
  <p>But got:</p>
  
  <pre><code>Name    Age     Score
  Peter   null     null
  null    56       null
  null    null     100
  Buzz    null      null
  null    47       null
  null    null      120
  </code></pre>
  
  <p>Any advises?</p>