title: T-SQL - How to escape a slash / in square brackets in LIKE clause
body: <p>I'm trying to use T-SQL LIKE against multiple values. After my research, the easiest way seems to be something similar to:</p>
  
  <pre><code>SELECT Column1 
  FROM Table_1
  WHERE Column1 LIKE '[A,B,C]%'
  </code></pre>
  
  <p>So that I can expect the output looks like A1,B2,C3...</p>
  
  <p>My problem is that the elements(A,B,C) for my scenario are in the format of "X/Y/Z" -- yes, contains slash! And slash will be treated as a delimiter -- the same as comma. For instance, I want to select any places in New York, Tokyo and London, so i wrote:</p>
  
  <pre><code>WHERE Location LIKE '[US/New York, Japan/Tokyo, UK/London]%' 
  </code></pre>
  
  <p>But it does the same as </p>
  
  <pre><code>WHERE Location LIKE '[US,New York, Japan, Tokyo, UK, London]%'
  </code></pre>
  
  <p>And it will return US/LA/CBD or Tokyo/Tower...</p>
  
  <p>Can anybody light my way how to escape slash within the square brackets for LIKE clause here? Many thanks in advance.</p>
  
  <p>Here is the sample table:</p>
  
  <pre><code>DECLARE @temp TABLE (Location NVARCHAR(50))
  INSERT INTO @temp (Location ) VALUES ('US/New York/A')
  INSERT INTO @temp (Location ) VALUES('New York/B')
  INSERT INTO @temp (Location ) VALUES ('Japan/Tokyo/C')
  INSERT INTO @temp (Location ) VALUES ('Tokyo/D')
  INSERT INTO @temp (Location ) VALUES ('UK/London/E')
  INSERT INTO @temp (Location ) VALUES('London/F')
  </code></pre>
  
  <p>And below is my draft script:</p>
  
  <pre><code>SELECT *
  FROM @temp
  WHERE Location LIKE '[US/New York, Japan/Tokyo, UK/London]%'
  </code></pre>
  
  <p>I was expecting the output is: 
      US/New York/A
      Japan/Tokyo/C
      UK/London/E
  but actually all of them will be pulled out.</p>