Use to_number
to convert budgpost
to a number:
when to_number(budgpost,99999) in (1001,1012,50055) THEN 'BP_GR_A'
EDIT: Make sure there are enough 9
's in to_number
to match to largest budget post.
If there are non-numeric budget posts, you could filter them out with a where
clause at then end of the query:
where regexp_like(budgpost, '^-?[[:digit:],.]+$')