If you are female, that's called homoflexibility.
If you are male, i think that's heteroflexibility.
Homoflexible: Attracted to the same gender, but sometimes on rare occasions attracted to the opposite gender
Heteroflexible: Flip homoflexibility, and you get a straight person who is sometimes, occasionally attracted to their own gender.