Change this
set @set='insert into '+@TableName+'(Name,City,Dept) values(@name,@City,@Dept)'
to
set @set='insert into '+@TableName+'(Name,City,Dept) values('+@name+','+@City+','+@Dept+')'
Change the above sql statement as per your requirement. You will need to wrap your string in apostrophes.