Replacing column value on given condition in a spark scala dataframe

I have a dataset woth some wrong column values. I want to correct them according to given condition. Please suggest some solution as i am new to scala and cant find any direct method.

table 01 => City Name | Zip Code DehraDun | 12345 Delhi | 67890

table 02 => City Name | Zip Code DehraDun | 248001 Delhi | 120012

Table 01 is incorrect and according to city name i want to correct it and make it as table 02. I am using dataframes for performing this task.

Any help is much appreciated here.

i completed the task using when and select.