Unexpected result for string comparison
In my comment beneath your question I asked you what collation you were using. You said "assume default", but there is no "default". The "default" depends on how your database and server are setup. I ran your experiment on my SQL Server and happened to get the same results you did, but that was merely a coincidence.
The SQL Server and database I ran the experiment on is using the SQL_Latin1_General_CP1_CI_AS
collation. Based on this fact, here is the ordering of characters:
http://collation-charts.org/mssql/mssql.0409.1252.Latin1_General_CI_AS.html
Notice that Tilde ~
comes before alphabetical characters which obviously includes x
.