Option to compare 2 columns while using if-then-else

when using the conditions in the if-then-else feature, the column can be compared with a predefined value only. Is there a possibility to compare the data in the column with another column from the same row in the same table.
Just like spreadsheet can compare data from 2 different cells to give an output.


That could be very useful.