INTERFACING SERVO AND FLEX SENSOR

please someone suggest me how to stop the servo when the flex value reaches my limit actually the servo is going back to original position i want to use it like a normal dc motor. my servo has to move in step by step (0 to 100) during if my flex sensor goes to actual position it should stop in that postion itself and not move to original position.