In order to do the job right, it's important to understand how the slider is constructed. I have seen a couple of different types:
In the most common design, the plastic knob is mounted on a stainless tube(not a rod). The easy way to tell if this is the design that you have is that the only thing visible in the slider box is the knob and the tube; you can't see the cable.
There is a hole in the tube for the set screw in the knob to pass through. The cable is threaded through the tube and the set screw is tightened, pinching the cable. It also deforms it somewhat, which is why it can be difficult to pull it out. In use, the knob does not slide on the tube, the knob and tube move as one unit.
With the other type, the know rides on a stainless rod low in the slider box and the cable is inserted into a hole above it, where it is held by a set screw. The cable and rod are clearly visible. There are two disadvantages to this design:
1- The cable is unsupported in the slider box, which makes it prone to kinking.
2- When the set screw is tightened, it presses the cable into the plastic of the knob, which molds to the shape of the cable. While this holds the cable securely, it can make it quite difficult to pull the cable out.
With either design, rinsing with fresh water to dissolve any salt deposit, then spraying with a water-displacing lube (WD-40, LPS, etc.) will help to make it easier to remove the cable from the slider. Installing the new cable is the reverse of the removal process.
One caveat, there are also different cable attachment methods at the skeg, which can be equally confusing and require very different repair methods. If you're lucky, yours will have a set screw, but the cables can still be tough to remove.