Matching two rows in a single table if two specific keys have different values
You can do a join on Value &lt;&gt; Value for the settings you are looking for.

select S1.Settings as Settings1,
       S1.Value as Value1,
       S2.Settings as Settings2,
       S2.Value as Value2
from Settings as S1
  inner join Settings as S2
    on S1.Value &lt;&gt; S2.Value and
       S1.Settings = 'clientvisits' and
       S2.Settings = 'displayvisits' 


Result:

Settings1            Value1               Settings2            Value2
-------------------- -------------------- -------------------- --------------------
clientvisits         2                    displayvisits        4