結果 : if statement in cursor sql server