I believe it is only useful to have a define to an object and not to a class definition.
And I do not see why you want to use this macro. If you need this you could make in the inital block of your toplevel an object of your cfg class and randomize it. Then you have specific value you can access.
`define just defines text replacement by a preprocessor before it gets to SystemVerilog compilation. The code after replacing the macro text must be legal syntax, which yours is not.