First of all backup your library before trying this solution in case something goes wrong.
You cannot do it in one step. The best way is to start by looking for books with you first priority format i.e azw (or maybe you mean azw3) by using this search
Now, select all the books, and right click > remove books > remove files of specific formats from selected books > choose all formats
except you preferred format.
Repeat the above for your other priority formats in order. That should work because when you search for books containing mobi, you will not get any books containing azw because these books have already been reduced to one format.