title: Where would I put CASE T-SQL
body: <p>I have this query below but I need to put a <code>CASE</code> somewhere in there that will make 'example,example' give an output of 'exampleexample' (minus the comma). Where would I put this? (I'm new to SQL) </p>
  
  <pre><code>SELECT DISTINCT i.ServerName, 'Standalone' AS Host, s.Status, s.Classification, 
                  s.Location 
  FROM tblSQLInstances i 
    LEFT OUTER JOIN tblServer s
    on i.ServerName = s.ServerName
  WHERE i.IsClustered = 0
    AND i.InstanceStatus != 'Demised'
  
  UNION
  
  SELECT esr.ServerName, e.EnvironmentDescription AS Host, s.Status, s.Classification, 
         s.Location  
  from tblSQLEnvironmentServerRel esr
    INNER JOIN tblSQLEnvironments e
    ON esr.EnvironmentID = e.EnvironmentID
  LEFT OUTER JOIN tblServer s
    on esr.ServerName = s.ServerName
  LEFT OUTER JOIN tblSQLInstances i
    on i.EnvironmentID = e.EnvironmentID
  WHERE i.InstanceStatus != 'Demised'
  </code></pre>
  
  <p>sorry if this makes little sense. </p>