title: Select Comma Separate values in SQL server 2012
body: <p>Following is the table:</p>
  
  <p><a href="https://i.stack.imgur.com/mBPvz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mBPvz.jpg" alt="enter image description here"></a></p>
  
  <p>I am trying to get comma separated values where <strong>ColC</strong> <code>is not Null</code></p>
  
  <p><strong>Output:</strong> </p>
  
  <p>(Sql,My),(Dev,Prod)</p>
  
  <p>I am using sql <code>server 2012</code> tried <code>COALESCE</code> but failed. Please help.</p>
  
  <p>Here the create and insert script:</p>
  
  <pre><code>create table T_MyIssue(ColA Varchar(50), ColB Varchar(50), ColC Varchar(50))
  
  Insert Into T_MyIssue(ColA,ColB,ColC)
  values('Sql','My','DB'),
  ('Server','MS',Null),
  ('Dev','Prod','Mongo')
  </code></pre>