title: How to split a single column into multiple columns in SQL Server select statement?
body: <p>I am new to SQL Server . I have a single long column with names starting from a, b, c and d. I want to show them in separate columns of NameA, NameB, NameC and NameD. I tried union but it shows in one column. I tried case but I dont know how to use it. Please help.</p>
  
  <p>Existing column </p>
  
  <pre><code>names
  A1
  B1
  A2
  C1
  A3
  A4
  
  A_names| B_names | C_names
  A1     | B1      | C1
  A2
  A3
  A4
  </code></pre>