I have to prepare update statement dynamically in stored procedure based on 4 input variables.

suppose take `test`, `test1`, `test2` and `test3` are input parameters.

then I have to prepare query like ,please help me to build this:

```
update emp 
   set empid='1' 
 where test = test 
   and test1 = test1 
   and test2 = test2 
   and test3 = test3

```

Suppose if the test and test1 values are null and test2 and test3 values are not null then I can prepare update statement like below

```
update emp 
    set empid='1' 
  where test is null       
    and test1 is null 
    and test2 = test2 
    and test3 = test3

```