Not having your database I cannot help you terribly much, but it looks like you need to be aliasing your tables. If you are trying to get a value from a table outside a subquery, you have to call it something different.
here is an example
select case
when a1.value = 1 then (select a2.id from tableA a2 where a1.val2 = a2.val2)
when a1.value = 2 then (select a3.id from tableA a3 where a1.val2 = a3.val2)
when a1.value = 3 then (select a4.id from tableA a4 where a1.val2 = a4.val2)
end as new_id
from tableA a1
hope this makes sense, if it doesn't, then that is what questions are for ;)