You place it in an event. Do you want your conditions to occur in battle, or outside battle is a question I should have asked first1. Also, by "where do u go to do this" do you mean in what type of event, or do you not know what an event is, or do you not know where to find variables and conditional branches?
1 I should have asked that first, because battle events have that condition as a default, and you set them up in the Troops Database. The solution I posted is for outside of battle