title: If the contents of a database table cell is a list, how do I check if the list contains a specific value in T-SQL?
body: <p>I have a SQL Server database table with a column called resources.  Each cell of this column contains a comma-delimited list of integers.  So the table data might look like this:</p>
  
  <pre><code>Product_ID    Resources    Condition
  1             12,4,253     New
  2             4,98,102,99  New
  3             245,88       Used
  etc....
  </code></pre>
  
  <p>I want to return the rows where a resource ID number is contained in the resources column.  This doesn't work, but something like this:</p>
  
  <pre><code>SELECT *
  FROM   product_table
  WHERE  resources CONTAINS 4
  </code></pre>
  
  <p>If this was working, it would return the rows for product_id 1 and 2 because both of the resources cells in those rows contain the value 4. It would not return product_id 3, even though the resources cell for that row has the number 4 in it, because it's not the full comma-delimited value.</p>
  
  <p>What is the correct way to do this?</p>