This looks like the issue with the "speculative execution" when GPU runs both branches and then somehow selects the correct one.
The issue can be easily fixed (and there is a clear warning in shader inspector) by initializing texColor variable explicitly before the switch (or, indeed, adding default: case).