In case someone else stumbles upon this post, like me. In SSMS 2012 with SQL 2012 Server feedback, I was able to use the code without problems as follows.
Declare @MyVariable Set @MyVariable = '%DesiredString%' Select * From Table_A Where Field_A like @MyVariable
Then, every time you want to change the desired line, just change it in the Set statement.
I know that this post was made before 2012, so I mention it if someone with a newer installation is watching this post.
source share