This does not use Miller (mainly because I couldn't find a convenient way to do the random characters) but GNU Awk:
awk -i ord -v OFS=, ' function randint(n) { return int(n*rand()) } BEGIN { srand(); A = ord("A"); Z = ord("Z") } NR == 1 { printf("%s,CASENUMBER\n", $0); next } { printf "%s,%c%c%.5d\n", $0, A + randint(Z-A+1), A + randint(Z-A+1), randint(100000) }' file.csv
This GNU Awk command pulls in the ord() function from the ord.awk library (which is distributed together with GNU Awk) to be able to convert between a character and its ASCII representation. It then initializes the random number generator with srand() and precomputes the ASCII values for the letters A and Z for convenience.
If the current record is the first record (i.e., it's the CSV header), it outputs it with the string ,CASENUMBER appended.
For all other records, it outputs the original record with an appended string after a comma. The string is computed as two characters and a zero-filled number. The two characters are picked from the range [A,Z], and the number is picked from the range [0,100000). The random picking of integers from a range is done using the randint() function, which I'm using unmodified from the GNU Awk manual.
An example output of running this on the given data:
COMPANY,NAME,STREET,ZIP,CITY,IBAN,CASENUMBER Test Ltd,John,Big Ben 343,4343,London,UK2348020384,HP88271 Test Ltd,Kate,Big Ben 343,4343,London,UK4389223892,XS17910 Test Ltd,Jake,Big Ben 343,4343,London,UK3892898999,UX00409
Note that as long as we're assuming that no field contains embedded newlines, we don't need to actually parse the input data. With that assumption, it's enough to just append new data to the end of each line.
terdon pointed out in comments that it may be a good idea to ensure that the computed case IDs are unique. This does this by keeping track of the already generated IDs in an associative array called seen:
awk -i ord -v OFS=, ' function randint(n) { return int(n*rand()) } function randid() { return sprintf("%c%c%.5d", A + randint(Z-A+1), A + randint(Z-A+1), randint(100000)) } BEGIN { srand(); A = ord("A"); Z = ord("Z") } NR == 1 { printf("%s,CASENUMBER\n", $0); next } { id = randid() while (seen[id]++ > 0) id = randid() printf "%s,%s\n", $0, id }' file.csv
I also moved the creation of the random case ID into its own function, as we need to call it twice from the main part of the code.