Obviously, turrets prioritize minions unless a friendly champ takes damage from an enemy champ within the turret's range, and if there are no minions the turret will target the first enemy champ to come within range. My question is this - if there are multiple enemy champs within range as the last friendly minion dies, how does the turret prioritize the enemy champs? Is it random, or is there some factor that affects which enemy champ the turret will start attacking first?
The League of Legends site covers this in this article. The priority of turrets is as follows (emphasis mine):
In regards to your question, the turret will target the closest enemy champion