You need to choose the real Scarecrow in one of your final encounters in the main storyline of Batman: Arkham Knight.
Scarecrow will have one last trick up his sleeve after you thwart his evil plan to cloud-burst toxins all over Gotham City. Once you manage to infiltrate his Stagg Airship in the latter parts of the main storyline, you will surprisingly encounter not one but two Scarecrows hunched over some controls. You will then be forced to pick the real Scarecrow as part of a choice-based decision in Batman: Arkham Knight.