title: How can I tell if a VARCHAR variable contains a substring?
body: <p>I thought it was <code>CONTAINS</code>, but that's not working for me. </p>
  
  <p>I'm looking to do this:</p>
  
  <pre><code>IF CONTAINS(@stringVar, 'thisstring')
     ...
  </code></pre>
  
  <p>I have to run one <code>select</code> or another, depending on whether that variable contains a string and I can't figure out how to get it to work. All the examples I'm seeing are using columns in the contains. </p>
  
  <p>Thanks in advance.</p>