title: Passing strings in Sql query from C#
body: <p>I Have a sql query as below:</p>
  
  <pre><code>Select CatId 
  From tbl_T2H_Category 
  Where Category IN ('Category3', 'Category4', 'Category6')
  </code></pre>
  
  <p>Now what i want is the values inside IN clause should be added dynamically from the checkboxlist. I am getting comma separated values from my control and passing that to the sql query like this:</p>
  
  <pre><code>string mystring = "Category3,Category4,Category6";
  cmd.commanText = "Select CatId From tbl_T2H_Category Where Category IN (" + mystring + ")";
  </code></pre>
  
  <p>This is not executing on sql side, because sql only recognises strings if they are inside "'" "'"  (single quotes). Kindly help me write the appropriate query.</p>