title: SQL SELECT WHERE string ends with Column
body: <p>I have this table in SQL Server 2012:</p>
  
  <pre><code>Id INT 
  DomainName NVARCHAR(150)
  </code></pre>
  
  <p>And the table have these DomainName values</p>
  
  <ol>
  <li>google.com</li>
  <li>microsoft.com</li>
  <li>othersite.com</li>
  </ol>
  
  <p>And this value:</p>
  
  <pre><code>mail.othersite.com
  </code></pre>
  
  <p>and I need to select the rows where the string ends with the column value, for this value I need to get the row no.3 othersite.com</p>
  
  <p>It's something like this: </p>
  
  <pre><code>DomainName Like '%value' 
  </code></pre>
  
  <p>but in reverse ...</p>
  
  <pre><code>'value' Like %DomainName
  </code></pre>