There is a good possibility that the cable housing is failing. Disconnect the cable and look at the ends of the housing. If you see the wires underneath the sheathing coming out the ends, it needs to be replaced. When shifter housing fails, the shift cable binds up, and the result is what you describe.