Microsoft Windows interprets such characters as %,| as the OS special characters. Thus, if you want to use them in the command line or batch files, you have to duplicate them.
Use:
SQLWays /d=dsn /s=select * from t1 where field1 like '%%123%%'
instead of
SQLWays /d=dsn /s=select * from t1 where field1 like '%123%'
Microsoft Windows treats the character > as a redirection character. If you want to use this character in the SELECT statements, you have to enclose the statement in double quotes:
SQLWays /d=dsn /s="select * from t1 where field2 > 123"