Hi Vivek,

Try using below formula:-

{=INDEX($C$1:$C$9,MIN(IF($B$2:$B$9=$A2,ROW($C$2:$C$9),"")),1)}

See attached file:- task.xlsx

Regards,
DILIPandey

<click on below 'star' if this helps>