Get the Radar Warning Receiver-upgrade (if year permits).
The moment you get a warning, immeadiatly order flank-speed, and dive to periscope-depth...at 12m, make a hook (this is to change course as soon as possible, without the wake of your disappearing conning-tower giving away the course-change).
Now stop engines, and listen...if you hear nothing anywhere, then you've just escaped from an air-attack, and go full speed again, to leave the area, and put some kms between yourself and your last known location. If you hear screws, then you can decide whether to setup for evasion or attack.
If you can't get the RWR - or enemy isn't using radar - then the warning of your watch-crew will come much later...don't bother fighting the plane, just dive full speed without hesitation, and speed away.
My '42 VIIC has double flak-twins, but I hope I'll never have to rely on them.
__________________
|