what should I do?

I have being best friends with this guy for two years now and I have being through all his relationships and always being there for him but when I talk to him about mine he just goes all weird. Three weeks ago I had to go to a class dinner and he is in my class. My friend told me that he kept on flirting with me for the whole time. The problem was that he has not being texting me and we always text so behind my back she texted him and he told her why he was not texting me . I was so upset because she said she could not say because she promised him. It was about me not her which made me really annoyed. At last she told me and it was that he really liked me but he was to scared that it would ruin our friendship but I really like him . I told him that and he said that he does not want to talk to me because it would hurt him and me to much. I miss him so much and he knows it . I am to scared to talk to him because I know it will hurt. What should I do I need advice.