2x 45 degrees, adjust the pipe length used between the two bends, to whatever distance you need it to come out.
Usefully, you may be able, by making the pipe between the 45's a little longer, to move the pipe right into the corner - if that will help.