Array values selection and value match from tables

i want to select a part of the cell content from a table read from a txt/csv file, for eg, if i have a column Value

Value

1a,2b,3c,4d,6e

7a,15b,8c

10h,20b,3c,4d,5s,6f,8g,2a

i) In this case, i want to keep the last two items always, no matter the length of the cell content, so my answer willbe

Value

4d,6e

15b,8c

8g, 2a

ii) and i want to associate that with another table (read from a txt file)

acd
1x0y0z0
2x1y1z1
3x2y2z2
4x3y3z3

saying if 'Value' column has '4d' pick 'z3' and if 2a then pick 'x1'

I tried using substring and string length for the first part but i think i am missing subsequent steps. Please help. Thanks.