Only the OR part is tricky, but with a general boolean expression containing NOT OR AND the only nice solution is this:
REM if A == B OR C == C then yes
(call :strequ A B || call :strequ C C) && echo yes
exit /b
:strequ
if "%1" == "%2" exit /b 0
exit /b 1