sql update statement with case statement with where clause