This is not possible in this way because MSSQL actually works correctly. MySQL is essentially a procedural wrapper around SQL, and as such this construct can work because it processes from left to right - as such @var1
exists when the second field is evaluated.
MSSQL correctly executes SQL as an atomic table based querying language, so the selected data as a whole is available when evaluating the fields, and they are then all evaluated based on the intermediate result.
The workaround posed in the other answer is the nice way to solve the issue.