Assuming col1 = A, col2=B, col3=C...Then you would put this in the 4th column and copy/paste down.
=OR(A1=B1,A1=C1)

adjust to fit your ranges