Apple Mail can do this natively (no need for a macro).
First, if the Favorites Bar is not visible under the Mail Toolbar, go to the View menu and select Show Favorites Bar (alternatively, use the keyboard shortcut: ⌘⇧⌥H to show the Favorites Bar).
Drag your desired destination folder (ABC in your example) to the Favorites Bar. Note its numerical position in the bar (if this is your first favorite, then the number will be 1).
With your message(s) selected, type: ⌃⌘1 (control-command-1).
Your message(s) will be moved.
You can set this up with nine different favorite folders in the Favorites bar. ⌃⌘2 will move selected messages to the second favorite. ⌃⌘3 will move selected messages to the third favorite and so on.