First make sure you have an Editable Spline and not just a line. Also, when defining the spline it is best to use as few points (vertices) as possible. Use Bezier handles to control curvature rather than adding more vertices (aka fit points). After converting the "line spline" to and Editable Spline select the vertices, right click and choose Bezier and you will see the spline tangent handles at the vertices.
If the cross section of the cable is a circle or rectangle then just check the Enable In Renderer and Viewport options.
If the cable has a custom cross section then consider using a Sweep modifier on the spline.
Once you have the spline's initial shape you can add a Spline IK Control modifier and then click Create Helpers. You can then keyframe the relocation of the helpers to animate the cable's change in shape. You can link the plug to the end helper. Moving the end helper with the linked plug will move the plug as well as the end of the cable.
When animating the changing shape of the cable you will need to be concerned about the stretching or shrinking of the cable's length. You can do this by visually estimating the new location of helpers and adjusting them as necessary. Another approach is to use bones and an IK Solver to help ensure the cable doesn't stretch. I do not like using bones as the solvers only work in a 2D plane and although the plane can be at any orientation I found it does not give me the flexibility I want.
Another challenge you will face is to correctly orient the plug to the direction of the end of the cable. You can use Tools, Align, Normal Align... if the cable was made using a Sweep modifier (one reason to use sweep rather than renderable thickness).
I'm sure there are other ways to manipulate the cable but this should give you a start.
lee.minardi