This question already has an answer here:

dynamically how to convert single row transposed into multiple columns.

enter image description here

marked as duplicate by Paul White sql-server Aug 6 at 14:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    they will always be when a maximum of 6 columns of being this way you can use the PIVOT – Edgar Vazquez Aug 6 at 14:01
  • 1
    and if your "noofuser" values are dynamically, you could build your PIVOT-statement with dynamic sql – Panschi11291 Aug 6 at 14:05

Browse other questions tagged or ask your own question.