Sql Update Query With If Condition