title: How to convert Row values into Column Headers in SQL Server 2008?
body: <p>Here is my query.</p>
  
  <pre><code>SELECT * FROM  client_data where RefID =27
  </code></pre>
  
  <p>and <code>Value</code> column's datatype is <code>nvarchar</code>.</p>
  
  <p>TABLE is like below...</p>
  
  <pre><code>AnalysisID  RefID        RefColumn               Value
  
  44      27  Reporting_Currency      EUR
  44      27  Reporting_Currency      EUR
  44      27  Reporting_Currency      USD
  44      27  Reporting_Group         0001
  44      27  Reporting_Group         0001
  44      27  Reporting_Group         0002
  44      27  Reporting_Language      EN
  44      27  Reporting_Language      EN
  44      27  Reporting_Language      DE
  65      27  Company_Code            -   
  65      27  MANDT               -   
  65      27  Reporting_Currency      -
  </code></pre>
  
  <p>Expected RESULT:</p>
  
  <pre><code>Analysisid       Reporting_Currency   Reporting_Group  Reporting_Language  
  
  44          EUR     0001          EN
  44          EUR     0001          EN
  44          USD     0002          DE
  65          -       
  </code></pre>
  
  <p>I tried with <code>PIVOT</code> but couldn't succeed.</p>
  
  <p>How can I do this? </p>
  
  <p>Regards,
  Jn</p>