Update a SQL Column dynamically based on a substring of another column Lets say I have a table in SQL