title: use % wildcard with ' in ' operator in sql server
body: <p>i have a stored procedure and im passing a list of comma separated values as the @At1</p>
  
  <pre><code>Create spGetProducts @At1 VARCHAR(200)
  begin
  select * from tblProducts where Category1 IN (SELECT * FROM CSVToTable(@At2))
  end
  </code></pre>
  
  <p>the function CSVToTable basically takes the comma separated values and puts them in a table.</p>
  
  <p>problem is i would like to use a LIKE wildcard with the IN operator however that does not work.</p>
  
  <p>So if i have a in row Category1 a test and the CSVTOTABLE would return a value of 'es', then it would select the row just like if i had %es%.
  Basically i just want to have percentage signs in the comma separated values while using the in operator.</p>
  
  <p>im using sql server 2012</p>
  
  <p>EDIT</p>
  
  <p>my CSVTABLE return one column table with each row having a comma separated value.</p>