I might help if you share a bit more detail on the search you are running, but it sounds like you're looking for the substr() eval function:
Not looking for SubString
if result from splunk query is like below
But i want to replace with another string like below
You can do that in 2 ways:
1: with something like this:
| eval new_string = case(old_string="ABC","XYZ",old_string="DEF","UVW")
2: You could store the mapping into a lookup and use the lookup command to find the new string that corresponds to the original string.