title: How to convert rows into columns in SQL based on column field in SQL
body: <p><img src="https://i.stack.imgur.com/UElgk.png" alt="enter image description here" /></p>
  <p>Hi,</p>
  <p>I am having this requirement to create an extract with alias name for a given ID.
  Alias has been entered as rows in the table. But, the requirement is to add that to different column and create one single row for an ID as described. Need to achieve this is SQL. Pivot option didn't work</p>