Question: I know I can use `CASE` statement inside `VALUES` part of an insert statement but I am a bit confused.

I have a statement like,

Answer: 
Here's a query structure that you can use (using JohnnyBeGoody's suggestion of using a SELECT statement to select the values).

```
INSERT INTO TABLE_XYZ (ED_MSISDN, ED_OTHER_PARTY,  ED_DURATION) 
SELECT 
    '2054896545' ED_MSISDN, 
    '6598898745' ED_OTHER_PARTY, 
    CASE  
        WHEN ED_OTHER_PARTY = '6598898745' THEN '9999999' 
        ELSE '88888' 
    END ED_DURATION
FROM DUAL;

```
You cannot self-reference a column in an `insert` statement - that would cause an "ORA-00984: column not allowed here" error.

You could, however, use a `before insert` trigger to achieve the same functionality:

```
CREATE OR REPLACE TRIGGER table_xyz_tr
BEFORE INSERT ON table_xyz
FOR EACH ROW
    NEW.ed_duration = CASE NEW.ed_other_party 
                      WHEN '6598898745' THEN '9999999' 
                      ELSE '88888' END;
END;

```