I would like to use the result of a test mathematically to decide whether to set a value to a different number if it happens to be zero or whatever.
For example, if I issue something like this: SELECT (1=1)* 100 AS value I would like value to result as something like 100 or -100 (the latter is how I remember Commodore Basic working). But instead I get a syntax error on the equal sign. Is there a way to do this in MSSQL to simplify my queries?