Use potmeter as encoder

Is there a way that a potmeter can act like an encoder? I want it to send value 1 when rotated clockwise and 65 when rotated ccw.