Solution 1 will give you the results
>col1 col2
123 123
456 456
123 123
456 456
I.e. it will not return the value set
123 321
. Assuming you just have reversed values and are not wanting all combinations then you could do something like (assumes SQL 2016 or better)
select col1,col2
from @demo
where col1 = col2
or REVERSE(col1) = col2
or REVERSE(col2) = col1;
which returns
col1 col2
123 123
456 456
123 123
123 321
456 456
To get just the three rows you list as your expected results you will need to use the DISTINCT keyword.
It gets more complex if you want to include col3 as well, but the principle is the same.