(gawk)
awk -F"," '{ print $0 >> $4".csv"}' filename
Expl:
-F"," -- Use "comma" field separator (FS)
$0 -- the whole line of input
$4 -- the 4-th field of line ($NF -- the last field)
>> -- redirection operator, from 'info gawk':
'print ITEMS >> OUTPUT-FILE'
This redirection prints the items into the preexisting output file
named OUTPUT-FILE. The difference between this and the single-'>'
redirection is that the old contents (if any) of OUTPUT-FILE are
not erased. Instead, the 'awk' output is appended to the file. If
OUTPUT-FILE does not exist, then it is created.