Maybe this:
“Whatever state of being one remembers when he quits his body, that state he will attain without fail.”
Or perhaps:
“The results obtained by these foolish persons are temporary. Those who worship devas [demigods] attain the devas, and those who worship Me attain to me.”
The second one sounds something like it. Thanks!