Erectile dysfunction

I suffer from ED but only when I'm sober, when I'm drunk, I'm alright. What to do?

ED can be quite complex depending on the cause which could be physical, psychological or a combination of both. No easy answer and would suggest you discuss with your GP first.
If you are able to get and maintain an erection when drunk maybe your just anxious of not being able to when you are sober and this creates a vicious circle (? performance anxiety ) Can you get an erection to masturbate?
Don’t reach straight for the viagra without further exploration first.
Hope this helps.

Yes, I have no problem to get erection to masturbate, just when having sexual intercourse, it won’t work without being drunk.

I would speak go your GP, sounds like its psychological, when sober you know you are going to struggle to get hard then dwell on it this in turns creates a vicious circle. Depends also on how the ED impacts on your life and relationships.
I’m no expert although i do suffer from ED myself which I believe is more psychological than physical.