Question: Please help me with the query 
Below are the table and requirement details

[![enter image description here](https://i.stack.imgur.com/ux4O6.png)](https://i.stack.imgur.com/ux4O6.png)

Answer: 
Just for completeness, this is straightforward in a data step, using `select`, `when`, `do`, `otherwise`. Or you could just use `if`, `then`, `do`, `else`.

```
data want;
set example;
select (x);
    when ('A') do;
        thing1 = 'Result1A';
        thing2 = 'Result2A';
        end;
    when ('B') do;
        thing1 = 'Result1B';
        thing2 = 'Result2B';
        end;
    otherwise do;
        thing1 = 'Error';
        thing2 = 'Error';
        end;
end;
run;

```
In your case, maybe you could try this:

```
proc sql;
  create table make_two_from_one as
  select *
  , case
      when x = 'A' then 'Result1A'
      when x = 'B' then 'Result1B'
      else 'Error'
    end as thing1,
    translate(calculated thing1,'2','1') as thing2
   from example
  ;
quit; 

```