You can take your reaction, including using it to make an opportunity attack, even if it is your turn. ("A reaction is an instant response to a trigger of some kind, which can occur on your turn or on someone else's. The opportunity attack, described later in this chapter, is the most common type of reaction." BR, p.70) So if you do something on your turn that causes an enemy to use its reaction to move out of your threatened area (for example, wall of fire, if the enemy succeeds on its Dex save), you can use your reaction to make an opportunity attack.
Note, though, that you cannot cast a spell with a casting time of '1 reaction' in the same turn in which you've cast a spell with a bonus action, unless the reaction spell is a cantrip.