title: How to get query result in multiple columns in Postgres?
body: <p>I am new to Postgres. I have a table which has the data in the below format:</p>
  <p><a href="https://i.stack.imgur.com/Io1Zy.png" rel="nofollow noreferrer">Table Data</a></p>
  <p>And I want it in the following format. Any help would be appreciated.</p>
  <p><a href="https://i.stack.imgur.com/vOPKC.png" rel="nofollow noreferrer">Output Format</a></p>