title: A SQL Problem. Check condition with in a comma seperated value
body: <p>I have a vairable</p>
  
  <pre><code>DECLARE @AssignOn nvarchar(20)='0,2,5'
  </code></pre>
  
  <p>I want to check a condition like this</p>
  
  <pre><code>DECLARE @index int
  SET DATEFIRST 7
  SELECT @index=DATEPART(DW, GETDATE())-1
  IF(CONVERT(nvarchar(2),@index) IN @AssignOn)
  </code></pre>
  
  <p>IN cannot be used here . Any other methods to do this <code>INLINE</code></p>