SQL change value for result set, but don't update

simplyfemales used Ask the Experts™
I would like to select a data set and depending on the criteria, I would like to change the value of specific cells, but I don't want to change the original data, just specifically what is seen in the resultant set.

I.E.  if my source=Code1, then in the result set, I would like it to show "Changed Code", but I do not want to update the source table.

How can I accomplish this?  I am trying to work with CASE setting criteria.

I have tried:

case when source='Code1' then source='Changed Code' else null end

but it doesn't work

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer

case when source='Code1' then 'Changed Code' else '' end
case when source='Code1' then 'Changed Code' else null end

should work.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial