Finally figured it out. It's like this:
exec sp_create_plan_guide
@name = N'TestPlanGuide1',
@stmt = N'SELECT top 1000 ColumnName FROM [DBName].[dbo].[TableName] with (nolock)
WHERE (ColumnName < Criteria)',
@type = N'SQL',
@module_or_batch = NULL,
@params =...