title: How to get multilple row of data into 1 row with different column name?
body: <p>I have the written the following query :</p>
  
  <pre><code>select user_id, id ,value 
  from users us 
  left join masterdata md 
      on md.id = us.id
  left join masterdatatemp mdt 
      on mdt.id = us.id
  where id = 6 and value = 1
     or id = 6 and value = 0 
  order by id
  </code></pre>
  
  <p>The above query returns:</p>
  
  <pre><code>User_Id ID VALUE
  6       55  1
  6       55  0
  6       84  0
  6       84  1
  </code></pre>
  
  <p>But I want the output like:</p>
  
  <pre><code> User_Id    ID VALUE1  VALUE2
      6       55  1       0
      6       84  0       1
  </code></pre>
  
  <p>How can I convert my multiple rows to single column with different column name?</p>