I'm having a sharp pain under my left rib, near my stomach, right after I drink something...But not when I eat. What could it be?

Drinking alcohol? If you pour alcohol over a cut on your skin, it burns, right? No surprise that if your stomach is inflamed, then pouring alcohol into it will make it burn too. Please do yourself the favor ; stop if this is your circumstance.