This post covers transitioning an animation with a software event. This post builds upon Importing an Animation into Unity. The example below is based on having imported a model from Blender that already has two animations embedded in it (swim and idle).
This post will show how to setup a transition condition, and how to trigger it in code.
Looking first at the Animator Controller view, you'll see I've already added transitions between the Swim and Idle state.