title: Transpose Row to Column using SQL Server
body: <p>Could you help me one case, below</p>
  
  <p>I have an original table, like this:</p>
  
  <pre><code>
  +++++++++++++++++++++++++++
  Col1 | Col2
  +++++++++++++++++++++++++++
  A    | 1
  A    | 2
  A    | 3
  B    | 4
  B    | 5
  </code>
  </pre>
  
  <p>then I want a result is like this:</p>
  
  <pre><code>
  +++++++++++++++++++++++++++
  Col1 | Col2
  +++++++++++++++++++++++++++
  A    | 1,2,3
  B    | 4,5
  </code>
  </pre>
  
  <p>How should I do this in SQL Server?</p>