Transactions column's names in below code are dynamicaly generated (so it means that sometimes particular name/column doesn't exist). Using this select it finishes successfully only in case when every of those names exists, if not, I got error like this (example):

> 
> Error(s), warning(s): 42703: column "TransactionA" does not exist
> 
> 
> 

```
SELECT  
             *,
               ((CASE WHEN "TransactionA" IS NULL THEN 0 ELSE "TransactionA" END) - 
               (CASE WHEN "TransactionB" IS NULL THEN 0 ELSE "TransactionB" END) +
               (CASE WHEN "TransactionC" IS NULL THEN 0 ELSE "TransactionC" END)) AS "Account_balance"
        FROM Summary ORDER BY id;

```

Could you tell me please how can I check first if the column exists and then how can I nest another CASE statement or other condition statement to make it working in a correct way?