You are right that it is completely normal to have homosexual fantasies during adolescence, as the teenage years are ones of sexual development and experimentation. An individual who has a same sex encounter may do so purely out of curiosity, and that is okay. However there is a difference between fantasies and thoughts and one's own behavior. Fantasies do not have real world consequences while behaviors do.
By asking if it was "a right thing to do?" indicates that you may realize your behavior was not okay. Although you do not mention how old you are, TeenHealthFX is concerned that there might be an age gap between you and your brother-in-law. Even if sex is consensual and you are a willing participant, it is against the law for an adult to have sexual relations with a minor. If this relationship is still going on, TeenHealthFX urges you to stop having sex with your sister's husband immediately. You may want to see a mental health professional who could help you sort out your feelings and understand why you should not be involved in a relationship like this.
Aside from the legal issues that make your sexual relationship with your brother-in-law unacceptable, there are many emotional ones involved as well. This man is married to your sister. Your brother-in-law is cheating on her by having sex with you. How do you think your sister will feel if she finds out that you had sex with her husband? How will the rest of your family react? Your involvement with your brother-in-law could cause your entire family a great deal of pain as well as impacting the ability to trust in your current and future relationships.
If you still have fantasies about men and wish to satisfy them with other people, TeenHealthFX urges you to read up on safer sex and safer anal sex to help protect yourself against contracting sexually transmitted diseases (STDs). Anal sex is a behavior that puts you at risk for contracting HIV/AIDS and other STDs unless you take the necessary precautions and are safe in your behaviors. If you have questions about your sexuality or would just like some information you can contact: Gays and Lesbian Teens, 1-800-850-8078, 24 hours, 7days a week (A crisis hotline for gay, lesbian and questioning youth, ages 25 and younger).