i had pain also under right breast that was horrible, but it would come and go, after 2 years of going in and out of family doc, was sent to rhematologist, and that is how i found out i had hep c, the also did liver biopsy, and ultra sound, i am not saying this is what you have, but please get to the doctor and find out what is wrong.
You really should follow up with your doctor; while the liver is located in the upper-right quadrant of the abdomen, you are lacking sufficient diagnostic information, and any info you get on the internet would be purely speculative.
I hope everything works out for you. Take care—
Bill