結果 : sql nested if statement in where clause