I have requirement to create a stored procedure which will call a exec statement to select a column from a table.I need to have a case and like statement inside it.I can't get the right syntax.I get an error "incorrect syntax near 123".

```
declare @sql varchar(1000)=''
set @sql='exec(''
select 
 case 
    when col like ''123%'' then ''123''
    when col=''234'' then ''234''
    else 'Other' 
 end as col from table'')' 

```