title: how to group column as per its unique value and get count in to different column as per its value?
body: <p>I am having a Category table as follows,</p>
  
  <p><a href="https://i.stack.imgur.com/ytTt1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ytTt1.jpg" alt="This is my table"></a></p>
  
  <p>i want retrieve following results according to <code>scStatus</code>value and its count group by <code>catID</code> </p>
  
  <pre><code>catID | 0 | 2 | 3
  ----- |---|---|---
   2    | 1 | 0 | 1
   3    | 1 | 1 | 0
   4    | 2 | 0 | 1
   5    | 0 | 1 | 0
  </code></pre>
  
  <p>I tried this,<code>select catID,count(scStatus) as [Count] from tableName group by catID,scStatus order by catID</code> but i cant get into column that values.</p>
  
  <p>`</p>