You write "Oracle" as tag, so I assume you could use PLSQL / a stored procedure to achieve this.
So here is my fist link: http://translate.google.at/translate?hl=de&langpair=de%7Cen&u=http://www.datenbank-plsql.de/ (Sorry, it's originally in German) ...
UPDATE:
HERE I found something interesting:
Oracle:
SELECT '0' || a, '0' || b, '0' || c ,'0' || d FROM table_name
should work