I believe it's a poor ground contact possibly within the switch itself. if your car is rusty look for external ground contacts and make sure that they are on clean shiney metal. If all looks good i'd replace the switch.
Often this type of behavior is caused by a bad ground for the lighting circuit. Check the ground circuit for the brake lights.
Fuse, wiring, bulbs
Most likely a fuse or a bad ground.
20 amp square 2 prong fuse
Check the fuses and the bulbs.
in dash lights
blowen fuse or lights check fuse first
depends on which lights? inside over head? /Dash board?/Doors? /front headlights?/Flashers?/ turn signals?/ Backing lights?/ Parking lights?/ So which ones ? what Year??
Bumper mounted park lamps
Start by checking your fuses. Then bulbs. Then switches in that order.
There are separate flasher relays for the hazard lights and turn signals. The flasher relay may be out on your blinkers. The relay for the hazards is behing the fuse box. The relay for the blinkers is behind the lower dash panel to the right of the steering column.
Check grounds Check loose wire on switch Check defective switch