You can use a rack joint to link the rotational motion of a revolute joint to the translational motion of a prismatic joint (or vice versa).
An example of a rack joint is a rack and a pinion.