It is not possible since the IF condition with semantically secure FHE's can be implemented as
$$Q = (A * S) + (B * S'),$$ this circuit is the combinational logic of the if/else statement and we can construct this with FHE.
- FHE encrypted $S$ is the input by the
if statement ( the boolean expression part).
- FHE encrypted $A$ is the input by the
- FHE encrypted $B$ is the input by the
- FHE encrypted $Q$ is the output of the expression.
This is for calculation of the ternary operator
Q = S ? A : B;
The IF condition must be implemented in this way. This is due to the semantical security that prevents the output of the comparison circuit to be known to the evaluator. The above circuit will reveal nothing to any observer. Actually, a similar calculation is also performed during normal programming to mitigate the side-channels.
Note that the
== can be achieved with 2's complement and substruction. For a little detail see this answer : Representing a function as FHE circuit
One might also wonder that does the comparison circuits in FHE are constant timing, the answer yes since we don't have IF then return/break statements.