Hi Sowrabh,
if char1 and char2 are numbers then we can achieve it by converting into formula variable. but it will show your char4 along with KF, if that isfine then follow below steps:
1. create formula variable var1 with replacement path of char1 value
2. create formula variable var2 with replacement path of char2 value
3. create selection1 on KF1 with char3=A
4. create selection2 on KF1 with char3=B
5. create formula: (selection1=KF1)*var1+(selection2=KF1)*var2
Please try. i think this should help to achieve your requirement.
Regards,
Dipti