A defective window switch is not just annoying, it can be a security risk if stuck in a down position. If your window is not functioning as it should, it might not be the window switch that is the problem.
A faulty window motor, corroded/ loose wires or a malfunctioning window regulator could be cause.
If you have checked all these potential factors and your window is still failing to function correctly then it is most likely the window switch will need replacing.
The window switch can be easily replaced at low cost with basic mechanical knowledge.