The right way is: "Das würde ich dir raten, sonst bekommst du es mit mir zu tun."
For example: Someone has done something wrong and he promised to never do the same thing again. The person who has gotten the promise says in return: "Das würde ich dir raten, sonst bekommst du es mit mir zu tun." To frighten the guilty person. It means something like: If you do this again, you will have me to contend with.