title: How to identify and flag a sub-string from a column of entries in Oracle SQL
body: <p>I'd like to add a column to my query that has a binary Yes/No, depending on whether a substring can be found anywhere in another column.</p>
  
  <p>Example: I'd like to find TTY and have them labelled in the new column:</p>
  
  <pre><code>Name | ...... | Flag_Column
  
  TestTTY123          Yes
  Test-test           No
  TTY111              Yes
  11TTY11             Yes
  Test-tube           No
  Test-TTY            Yes
  </code></pre>
  
  <p>Sorry if the question is very simple, I've tried searching for a solution, but it seems that it's a bit more particular than the ones I've come across.</p>
  
  <p>I've tried</p>
  
  <pre><code>case when INSTR(NAME,'TTY') = 1 THEN 'Yes'
  else 'No' 
  end Flag_Column
  </code></pre>
  
  <p>I was also considering using the <em>like</em> function, but it didn't seem like a good fit. Any suggestions pointing to an obvious solution I'm missing?</p>