Replacement of Multiple character with new character

Hi

It may be very basic question and i am sorry if this has been answered before but i am struggle for some time now to solve my issue and not been able to do so.

The problem is, I have a column called “Category” which has entries A,B,C,D,E,F,G,H,I & J (10 characters). I want to reduce these to four (A,B,C & D) and want E & I to be replaced with A and F and J with B using only one node. I have used replace function, regexreplace but could not do it.

thanks in advance