It seems like bitfields are what you want, but it only seems so, because you need to distinguish order as well, so just recording that a button was clicked is not enough. One easy way to do this is to set A = 0, B = 1, C = 2, keep a "total" variable initialized to zero, and each time you click a button, you multiply the total by 3 before adding the corresponding value to the total. After all buttons are clicked, you add to the total (3^N - 3) / 2 where N is the number of buttons clicked. You can verify collisions are now impossible, and you get the following mapping:
A = 0
B = 1
C = 2
AA = 3
AB = 4
AC = 5
BA = 6
BB = 7
BC = 8
CA = 9
CB = 10
CC = 11
AAA = 12
AAB = 13
AAC = 14
ABA = 15
and so on...
in particular, BBB = 25 and ABC = 17, AAC = 14 and BBA = 24.
This mapping also works for any number of button clicks, i.e. two-button or four-button click combinations will also all have their own unique keys. If you know you will only ever need three-button click combinations, you can just drop the final addition involving N if you want to. This construction also happens to be optimal, producing the smallest possible keys, and also letting you convert the key back to the respective button clicks efficiently, should that be of use to you. Note the keys start from zero, just increment them if you need them to start at one.
(perhaps a "purer" mapping would be to add (3^N - 1) / 2 instead, and let 0 be the key corresponding to "no clicks at all" i.e. N = 0, but that's up to you)