Hello @Prapul Kumar Dongari and welcome to Microsoft Q&A!
I understand you want to do a comparison, but what are you comparing to? The pictures above appear to have identical data.
I suspect you want to do something like the below table. In this table we have 3 elements, X Y and Z. We are comparing Y and Z to X, and want to choose Y when Y is different from X, and choose Z when Z is different from X.
X | Y | Z | choose
A | A | A | X
A | A | B | Z
A | B | A | Y
A | B | B | Y or Z
A | B | C | ???