title: How to check a value exists in an integer array - SQL case statement
body: <p>I'm looking for a solution to check the existence of a value in an array, so that I need to toggle a column based on that values.</p>
  
  <p>Here is the table structure</p>
  
  <pre><code>ID    Name
  -------------------
  1     Alex
  2     John
  3     Joel
  4     Philip
  5     Susan
  6     Tim
  7     Jerry
  -------------------------
  </code></pre>
  
  <p>So the condition is I need all rows but there will be third column which will be based on an existence logic. That is the third column is T if the ID exists in (1,5,7) otherwise the column will be W. So the result will be something like this</p>
  
  <pre><code>ID    Name      status
  -------------------
  1     Alex      T
  2     John      W
  3     Joel      W
  4     Philip    W
  5     Susan     T
  6     Tim       W
  7     Jerry     T
  -------------------------
  </code></pre>
  
  <p>Thanks</p>