if you are using sql server then try the given below code. You can create a function using the below code and use it in your queries. Try & improve the code if you find any scope for the same -
declare @str varchar(100)='mad123hu'
declare @i int=1
while @i<=len(@str)
begin
declare @val varchar(1)
set @val=substring(@str,@i,1)
if ascii(@val) >=48 and ascii(@val)<=57
begin
declare @newchar varchar(1)
set @newchar=case ascii(@val)
when 48 then '!'
when 49 then '@'
when 50 then '#'
when 51 then '$'
when 52 then '%'
when 53 then '^'
when 54 then '*'
when 55 then '('
when 56 then ')'
when 57 then '_'
end
set @str=replace(@str,@val,@newchar)
end
set @i+=1
end
select @str