Pinching while coughing???

I coughed because I have a lot of phlegm in my lungs from allergies. And when I coughed it was like a pinching feeling down on the right side towards my hip bone. Nothing serious right???? Doesn't happen every time. I think it was the way I was sitting.