wmic useraccount where sid='<SID>' get name
E.g.:
wmic useraccount where sid='S-1-5-21-2593382467-3257137941-298862785-1000' get name
wmic useraccount where sid='<SID>' get name
E.g.:
wmic useraccount where sid='S-1-5-21-2593382467-3257137941-298862785-1000' get name