I would use 3 lookup commands

Code:
lookup digit, [$0D,$04, ...], patternA
lookup digit, [$C1,$80, ...], patternB
lookup digit, [$B7,$92, ...], patternC
Lookup2 allows for 16 bits, but that still would not meet your needs for 20 bits.