It sounds like you're converting a deflection to the applied moment that is required to cause the deflection?
The problem could be interpreted different ways, and it's unlikely the deflection is generated by a pure moment.
Regardless, it's a strength-of-materials beam design problem, approached by integration of the moment equation or reference to beam deflection equations in Formulas for Stress and Strain or other references.
Also note that for pipe with mechanical or push-on joints, the deflection may be accomplished at the joints rather than in the pipe.