結果 : if in sql server function